Skip to content

core: a read-only window's Memory panel still offers its writes and says nothing about why - #2277

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-p475-memory-readonly
Nov 3, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-p475-memory-readonly

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2276
Fixes #2279
Fixes #2283

Three read-only slices on one branch. They all end in the same client bundle and the same generated patch split, so they share one build and one generate: the alternative was three PRs each rewriting 0008-client-bundle.patch and fighting over core/client.js.

What each one fixes

docs/subsystems/core-client.md carries all three bullets, and each change has its own fragment under changelog.d/ (#2276, #2279, #2283).

Files

21 files, +17621/−16580. The semantic change is six files plus three new tests, three changelog fragments and the one-line topics.json mapping; everything else is the generated split: core/client.js and its 0008-client-bundle.patch (a module-order relocation of questions.js and schedules.js inside the bundle — the bulk of the line count, not new code), 0001-core-fixes.patch, 0003-flybot-api-client.patch, 0012-room-membership.patch, and the three whole-file mirrors under patches/ds-bot/files/test/. patches/ds-bot/topics.json is in the diff for one reason: src/client/questions.js is an upstream file FlyBot edits, so generate refuses the split until that file has a topic (0003-flybot-api-client), and without that one line core/ cannot be rebuilt.

Red first, then green

  • The overview half of core: a read-only window's Settings → Bot still draws the Bot settings form and says nothing about why #2279 has its own red: with the drawer not passing roster to ScheduleSummary, core/test/details-bot-settings-readonly.test.js was # tests 3 / # pass 2 / # fail 1, no create entry is drawn in a read-only window — actual ['No scheduled tasks yet. Add one'], expected []. With the roster passed again it is 3/3/0.
  • The other two suites were written against the behaviour they lock (a read-only window draws no write entry, a writable one keeps it), so each asserts both sides: the Memory panel 3/3/0 and the ask_user card 6/6/0 on this tip.

Evidence, measured on this tip's tree

  • Suites, each run with TZ=UTC node --import ./test/harness-resolve.mjs --test <file>:
    • memory-panel-readonly 3/3/0, details-bot-settings-readonly 3/3/0, questions-readonly 6/6/0 (tests/pass/fail).
    • Regressions in one run, # tests 173 / # pass 173 / # fail 0: memory 97/97/0, memory-empty 6/6/0, memory-search 4/4/0, schedules-client 52/52/0, questions 2/2/0, settings-readonly-head 3/3/0, sidebar-readonly 4/4/0, composer-locked 2/2/0, readonly-window-reads 3/3/0.
  • TZ=UTC npm run verify at the repo root — exit 0 on this tree (core lint + arch-docs, plugin lint, build-client.mjs --check, ds-bot-patches.mjs check, the core suite and both plugin suites).
  • ARCH_DOCS_BASE=89125458 npm run lint — Found 74 warnings and 0 errors (warnings pre-existing), arch-docs: OK (21 changed file(s)).
  • node scripts/ds-bot-patches.mjs check:
    ok   ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5)
    ok   10 patches apply cleanly in order
    ok   core/ equals ds-bot/ + patches/ds-bot/
    
  • node scripts/ds-bot-patches.mjs canonical — ok patches/ds-bot/ is what generate writes (generate is a no-op): generate was run twice on this tree and the second pass wrote nothing.
  • npm run build (in core/) reproduces the committed core/client.js byte-for-byte: a second build leaves the tree clean.
  • The branch was rebased from 19e206ec onto 89125458 after core: the read-only reads test passes on a dry answer — assert each row's own key #2280 merged, and build, generate, check, canonical and verify were all re-run there.

What I did not run

  • The bench smoke test — this branch touches no core/index.js and no core/src/host/ file.

Verified head: bb5a863229103b45a50baec3ca71d3d4e295e4a8 (tree e43d9a1538ed12b01adad475f2c856ab3fe9418b, single parent 891254589abb9aa6ac42bc1bb64874c716648876).

@HugoXK
HugoXK force-pushed the dev/1-p475-memory-readonly branch from c239506 to 15fa837 Compare November 3, 2026 06:07
@github-actions github-actions Bot added the risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff label Nov 3, 2026
@HugoXK
HugoXK force-pushed the dev/1-p475-memory-readonly branch from 15fa837 to df54b8a Compare November 3, 2026 07:16
@HugoXK
HugoXK marked this pull request as ready for review November 3, 2026 07:18
@HugoXK

HugoXK commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Ready to merge: the three read-only slices are on one tip, df54b8a4a29f8a4015c3748adaa42af34dc81f17 (tree e4ae0a75c3fab84a28dbbbb59faa69fc997c3660, base 19e206ecb52e61d5ed4170e8cb7ff0330711ea50).

Measured on that tree: memory-panel-readonly 3/3, details-bot-settings-readonly 2/2, questions-readonly 6/6, plus memory 97/97, schedules-client 52/52, questions 2/2, settings-readonly-head 3/3, sidebar-readonly 4/4, composer-locked 2/2, readonly-window-reads 3/3 — every one fail 0.
ds-bot-patches check: ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5), ok 10 patches apply cleanly in order, ok core/ equals ds-bot/ + patches/ds-bot/; canonical says generate is a no-op on this tree; npm run build reproduces the committed bundle; npm run lint 0 errors, arch-docs: OK (19 changed file(s)).

One thing this branch adds beyond the three slices: patches/ds-bot/topics.json gains src/client/questions.js — generate exits 1 on the whole split without it (edited upstream files with no topic).

No linked pull request or claim is replaced by this one; you may merge this tip once its checks are green.

@HugoXK

HugoXK commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy — #2277 is ready at this tip df54b8a4a29f8a4015c3748adaa42af34dc81f17 (base 19e206ecb5, 19 files +17550/−16588, mcm true, checks 15 success + 1 failure).

Tier is T1, so no PASS is needed for this one — the red check is enqueue-guard (do not enqueue #2277: no Verifier report names the tip df54b8a4a29f), which is the expected state until the queue entry itself; it turned red on the ready_for_review run at 07:17:07Z, before this tip's diff was readable.

Three seats in one PR, each Fixes line in the body:

  • Fixes #2276 — Memory panel: a read-only window still drew Remove on every row and a live Ask input, with no sentence saying why;
  • Fixes #2279 — Settings → Bot: a read-only window still drew 9 write controls (input/textarea/select/button) and said nothing;
  • Fixes #2283 — the chat's ask_user card: Submit did nothing (the refusal was swallowed) and the x hid the card until the next poll brought it back.

Author's numbers: the three source fixes plus one build + one generate; generate second pass is a no-op, ds-bot-patches check three lines green, arch-docs OK, lint 0 errors, and the affected suites green (details-bot-settings-readonly 2/2, questions-readonly 6/6, settings-readonly-head 3/3, sidebar-readonly 4/4, schedules-client 52/52, readonly-window-reads 3/3).

Please take this tip for the queue (or run the guard again on it — its earlier run predates the last rebase).

@HugoXK
HugoXK marked this pull request as draft November 3, 2026 07:28
…ite (ThinkFlowLab#2276, ThinkFlowLab#2279, ThinkFlowLab#2283)

Three read-only slices on one branch, because they all end in the same client bundle and
the same generated patch split: one build and one generate serve the three.

- ThinkFlowLab#2276: the Memory panel no longer offers Remove or the ask form in a read-only window
  (the host refuses memory-forget and memory-ask), and says why in the host's own
  sentence; the entries and Regenerate summary still work.
- ThinkFlowLab#2279: the details drawer's Settings view draws the host's read-only sentence in the
  form's place instead of mounting BotSettingsForm, reading the same window lock as the
  settings page.
- ThinkFlowLab#2283: the ask_user card draws no answer control in a read-only window, and keeps the
  answers it already holds.

`src/client/questions.js` is an upstream file FlyBot edits, so it also gains its topic in
patches/ds-bot/topics.json — without it generate refuses the whole split.

Tests: core/test/memory-panel-readonly.test.js, core/test/details-bot-settings-readonly.test.js,
core/test/questions-readonly.test.js.
@HugoXK
HugoXK force-pushed the dev/1-p475-memory-readonly branch from df54b8a to bb5a863 Compare November 3, 2026 07:49
@HugoXK
HugoXK marked this pull request as ready for review November 3, 2026 08:02
@HugoXK

HugoXK commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy — review request for PR #2277 at tip bb5a863229103b45a50baec3ca71d3d4e295e4a8 (40 characters, read now). This pull request is no longer a draft; the previous request named df54b8a4a29f8a4015c3748adaa42af34dc81f17, so this is the one conclusion that matters.

It carries three read-only slices on one tip (#2276 memory page, #2279 Bot settings form, #2283 ask_user card), rebased onto 891254589abb (live main). 21 files +17621/−16580: core/client.js and patches/ds-bot/0008 are the regenerated bundle, topics.json is one line; the semantic change is 6 source files, 3 new tests, 3 changelog fragments.

Changed since df54b8a4 — the two defects my own read found there:

  • core/src/client/details-drawer.js:352 passes roster into ScheduleSummary again, so the read-only Bot details overview no longer draws No scheduled tasks yet. Add one. The new case renders the overview through startTab:'details' (not by calling ScheduleSummary directly), which is why the call-site slip could not hide from it: with roster removed it goes red at details-bot-settings-readonly.test.js:164 (actual: ['No scheduled tasks yet. Add one'], expected: []), and the writable side asserts the entry is still drawn.
  • changelog.d/2279-details-bot-settings-readonly.fixed.md and changelog.d/2283-questions-readonly.fixed.md now exist, one line each, matching their issues.

FlyBot Test's advisory read at this tip (not a gate, your conclusion is): both modes rendered from the real modules — locked details overview 10 controls with no Add one, identical to base 89125458; all seven writable DOM trees byte-identical to base; the three new suites 3/3, 3/3, 6/6 and red-first on base; TZ=UTC ARCH_DOCS_BASE=89125458 npm run verify exit 0, 4617 pass / 0 fail / 0 cancelled, arch-docs: OK (21 changed file(s)), 10 patches clean, canonical no-op.

The enqueue-guard check is red only because no conclusion names bb5a863229103b45a50baec3ca71d3d4e295e4a8 yet; the other 15 checks are green.

@Birfy

Birfy commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at bb5a863
Written-by: Reviewer
Attestation: bb5a863 role=Reviewer

Ran at this tip:

$ cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/memory-panel-readonly.test.js test/details-bot-settings-readonly.test.js test/questions-readonly.test.js
# tests 12  # pass 12  # fail 0

Red first: the same command with core/src/client/memory-panel.js replaced by its 89125458 blob was # tests 12 / # pass 11 / # fail 1 — not ok 5 - P-475: a read-only memory panel draws no write and says in place why; restoring the tip file returned it to 12/12/0.

What I checked at the tip

  • Checks on bb5a863229: tests-ok success, package success, plugins (tree) / (social) / (timeline) / (workflow) success, Node 24 · DSH 0.2.0-rc.2 success, merge-gate success. The only red is enqueue-guard, and its own line says why: no Verifier report names the tip bb5a86322910 — this report is that missing report, not a failing build.
  • The semantic diff is the three slices the body names: memory-panel.js draws no Remove button and no ask/update form in a read-only window and states the host's own roster.readOnly sentence; details-drawer.js replaces BotSettingsForm with that sentence and passes roster on to ScheduleSummary; questions.js renders option rows as text (not buttons), drops the footer, the dismiss button, the custom-answer field and the <form> handler under lockedWindow, and cells.js hands roster to the inline card. All three are reads-vs-writes gates only — the host refusals are untouched.
  • Files the body claims are generated are only generated output: 21 files, the bulk in core/client.js and 0008-client-bundle.patch (module order), and arch-docs is green on the changed set.
  • Fork pull request (HugoXK/FlyBot), T1 by risk tier (report only), no hold, no comment after this report asking not to merge.

Not run: the bench smoke test — no core/index.js or core/src/host/ file is in this diff; npm run verify was not re-run by me (CI tests-ok at the tip covers it and is green).

@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 3, 2026
@github-actions github-actions Bot added the pass label Nov 3, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 3, 2026
Merged via the queue into ThinkFlowLab:main with commit a9c5a50 Nov 3, 2026
17 checks passed
@Birfy
Birfy deleted the dev/1-p475-memory-readonly branch November 3, 2026 08:26
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 3, 2026
HugoXK added a commit to HugoXK/FlyBot that referenced this pull request Nov 3, 2026
… change (ThinkFlowLab#2265)

Fixes ThinkFlowLab#2247

Owner: Dev2
Reviewer: Reviewer
Claim-Id: ae99f17f04c0438ca64d71ddcfa6f1e9
Branch: dev/2-readonly-banner-reload
Base: 55503e1
Tree: 1795cfb
Verified commit: 4cf69b2
Pushed head: 4cf69b2

**Scope** — the read-only sidebar banner (wide and rail forms) carries a
`Reload` control outside the live region, and the client can ask for a
fresh state answer that is applied even when the revision is unchanged,
so a window that has become writable picks the change up without a page
reload.

Re-tipped onto live main `55503e16b359` (after `ThinkFlowLab#2277`, `ThinkFlowLab#2290` and
`ThinkFlowLab#2275`); `core/client.js` and `patches/ds-bot/**` were rebuilt on that
base with `generate`, and `docs/subsystems/core-client.md` merged with
`ThinkFlowLab#2275`'s kanban line intact — the file is this base plus exactly the
`ThinkFlowLab#2247` bullet. The large generated diff is the usual `generate`
re-alignment of the client bundle (the same shape `ThinkFlowLab#2277` and `ThinkFlowLab#2275`
have); `core/client.js` against this base carries only the `ThinkFlowLab#2247`
hunks.

**Files** (13, +5996/−4469)
- `core/src/client/sidebar.js` — the button in both banner forms
- `core/src/client/sources.js`, `core/src/client/index.js` — the fresh
request and its in-flight guard
- `core/test/client-reload-state.test.js`,
`core/test/sidebar-readonly-reload.test.js` — the new cases
- `docs/subsystems/core-client.md`,
`changelog.d/2247-readonly-banner-reload.fixed.md`
- `core/client.js`, `patches/ds-bot/**` — the generated bundle and
mirrors

**Readings at `4cf69b209` (committed, clean tree)**
- `TZ=UTC ARCH_DOCS_BASE=55503e16b359f034d71328f920aae6bbf674e0d1 npm
run verify` — exit 0, 8 suites, **4656 tests / 4656 pass / 0 fail**,
`arch-docs: OK (13 changed file(s))`.
- `node core/scripts/build-client.mjs --check` — exit 0.
- `node scripts/ds-bot-patches.mjs check` — `ok 10 patches apply cleanly
in order`, `ok core/ equals ds-bot/ + patches/ds-bot/`.
- `node scripts/ds-bot-patches.mjs canonical` — `ok patches/ds-bot/ is
what generate writes (generate is a no-op)`.
- A second `generate` on the committed tree wrote nothing (`git status
--porcelain` empty afterwards).
- Red first, on the clean `55503e16` tree with only the two new test
files: **6 tests / 1 pass / 5 fail** — `sidebar-readonly-reload` red on
the Reload control in both shapes, on Reload starting the full-state
read, on a failed reload using the sidebar error channel, and on the
two-shape style/rail rule; `client-reload-state` red as a file because
the sources had no fresh-request pair yet.
- Conflict markers: `git grep -nE '^(<{7}|={7}|>{7})' -- docs core
patches changelog.d` answers no line (exit 1).

**Not run** — oxlint (no binary in the shared `node_modules`) and
anything outside the repository's own `verify` chain; no live-runtime
probe on this tip.

## Checkpoint

<!-- flybot:checkpoint -->
```json
{
  "pr": 2265,
  "claim": "Dev2",
  "issue": 2247,
  "summary": "The read-only sidebar banner now carries a Reload button in both the wide and the rail shape. It sits beside the status line, not inside the role=status region, so the live region stays text. Pressing it runs the client's new reloadTeam action, which asks the host for a whole team read (no since) so an unchanged revision still re-reads readOnly, and the poll stands back while a reload is in flight. Two new test files cover the control in both shapes, the fresh request, the stale-answer rule and the sidebar error channel.",
  "files": ["core/src/client/sidebar.js", "core/src/client/sources.js", "core/src/client/index.js", "core/test/sidebar-readonly-reload.test.js", "core/test/client-reload-state.test.js", "docs/subsystems/core-client.md", "changelog.d/2247-readonly-banner-reload.fixed.md"],
  "checks": { "ran": "node --import ./test/harness-resolve.mjs --test test/sidebar-readonly-reload.test.js test/client-reload-state.test.js; node core/scripts/build-client.mjs --check; node scripts/ds-bot-patches.mjs check", "result": "green", "at": "4cf69b209b4980f9efdfc85998c08a11672cf972" },
  "next": "none — ready for review"
}
```
<!-- /flybot:checkpoint -->

Co-authored-by: Dev-2 <dev2@flybot.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pass risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff

Projects

None yet

2 participants